package com.why.mapper;

import com.why.pojo.Category;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
* @author 王-自信
* @description 针对表【category】的数据库操作Mapper
* @createDate 2024-11-26 16:12:56
* @Entity com.why.pojo.Category
*/
public interface CategoryMapper extends BaseMapper<Category> {
    @Select("select * from category where category_name=#{categoryName}")
    Category getByCategoryName(String categoryName);

    @Update("update category set category_name=#{categoryName},category_alias=#{categoryAlias},update_time=now() where id=#{id}")
    void updateCategory(Category category);
}




